//
//  UIViewController+Extension.h
//  EMC
//
//  Created by apple on 2017/3/11.
//  Copyright © 2017年 sangcixiang. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef enum : NSInteger {
    NotReachable = 0,//没有网络
    ReachableViaWiFi,//当前使用Wifi网络
    ReachableViaWWAN //使用的蜂窝网络
} NetworkStatus;

@interface UIViewController (Extension)


-(void)pushViewController:(UIViewController *)viewController;
-(void)popViewController;

/** 获取图片 */
- (void)openImagePickerWithTarget:(id)target withType:(UIImagePickerControllerSourceType)type editing:(Boolean)editing;

-(void)openAlertControllerTitle:(NSString *)title message:(NSString *)message style:(UIAlertControllerStyle)style actionTitle1:(NSString *)actionTitle1 actionTitle2:(NSString *)actionTitle2 callback:(void (^)(int index))callback;

-(void)openImagePickerWithTaget:(id)taget withType:(UIImagePickerControllerSourceType)type editing:(Boolean)editing;


- (int)networkingStatesFromStatebar;

@end
